package com.rinlink.jbcodec.transform;

import java.nio.ByteBuffer;

public class BytesToBoolean extends BytesToObject<Boolean> {

    public BytesToBoolean(ByteBuffer byteBuffer) {
        super(byteBuffer);
    }

    @Override
    public Boolean transform() {
        byte data = getByteBuffer().get();
        return data == 0 ? false : true;
    }
}
